package com.fengplus.demo.controller;

import com.fengplus.demo.entity.CommonResult;
import com.fengplus.demo.service.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/feign")
public class FeignController {

    @Autowired
    private FeignService feignService;

    // 正常
    @GetMapping("/a")
    public CommonResult a() {
        return feignService.a();
    }

    // 超时
    @GetMapping("/b")
    public CommonResult b() {
        return feignService.b();
    }

    // 计算错误
    @GetMapping("/c")
    public CommonResult c() {
        return feignService.c();
    }

}
